﻿<UserControl x:Class="VmroleAuthor.Views.OperatingSystemProfileView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignWidth="900">
    <Grid VerticalAlignment="Top" ShowGridLines="False">
        <Grid.RowDefinitions>
            <RowDefinition Height="6" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="6"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="6"/>
        </Grid.ColumnDefinitions>

        <!-- SelectedOperatingSystem -->        
        <Label Grid.Row="1" Grid.Column ="0" >Select</Label>
        <ListBox x:Name="OperatingSystem" Grid.Row="1" Grid.Column="2"  
                 BorderThickness="0"
                 ItemsSource="{Binding Path=AvailableOperatingSystems}" 
                 SelectedItem="{Binding Path=SelectedOperatingSystem, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}">
            <ListBox.ItemContainerStyle>
                <Style TargetType="{x:Type ListBoxItem}">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ListBoxItem}">
                                <RadioButton Content="{TemplateBinding Content}"
                                     IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsSelected}"/>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </ListBox.ItemContainerStyle>
        </ListBox>
        <ContentPresenter Grid.Row="2" Grid.Column ="2" Content="{Binding ElementName=OperatingSystem, Path=(Validation.Errors).CurrentItem}" />

        <!-- ComputerNamePattern -->
        <Label Grid.Row="3" Grid.Column ="0" >ComputerNamePattern</Label>
        <ContentControl Grid.Row="3" Grid.Column="2" 
                        Content="{Binding Path=ComputerNamePattern}" 
                        IsEnabled="{Binding Path=IsOSCustomized}">
            <ContentControl.Style>
                <Style TargetType="ContentControl">
                    <Style.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </Style.Triggers>
                </Style>               
            </ContentControl.Style>
        </ContentControl>

        <!--TimeZone -->
        <Label Grid.Row="4" Grid.Column ="0" >TimeZone</Label>
        <ContentControl Grid.Row="4" Grid.Column="2" 
                        Content="{Binding Path=TimeZone}" 
                        IsEnabled="{Binding Path=IsOSCustomized}">
            <ContentControl.Style>
                <Style TargetType="ContentControl">
                    <Style.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ContentControl.Style>
        </ContentControl>      

        <!--AdminCredential -->
        <Label Grid.Row="5" Grid.Column ="0" >AdminCredential</Label>
        <ContentControl Grid.Row="5" Grid.Column="2" 
                        Content="{Binding Path=AdminCredential }" 
                        IsEnabled="{Binding Path=IsOSCustomized}">
            <ContentControl.Style>
                <Style TargetType="ContentControl">
                    <Style.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ContentControl.Style>
        </ContentControl>

        <!-- SelectedWindowsOsCustomizationOption -->
        <Label Grid.Row="6" Grid.Column ="0" >Select</Label>
        <ListBox x:Name="SelectedWindowsOsCustomizationOption" BorderThickness="0" Grid.Row="6" Grid.Column="2"  
                 IsEnabled="{Binding Path=IsWindows}"
                 ItemsSource="{Binding Path=AvailableWindowsOsCustomizationOptions}" 
                 SelectedItem="{Binding Path=SelectedWindowsOsCustomizationOption, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{x:Null}">
            <ListBox.ItemContainerStyle>
                <Style TargetType="{x:Type ListBoxItem}">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ListBoxItem}">
                                <RadioButton Content="{TemplateBinding Content}"
                                     IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsSelected}"/>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </ListBox.ItemContainerStyle>
            <ListBox.Style>
                <Style TargetType="ListBox">
                    <Style.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </Style.Triggers>                    
                </Style>
            </ListBox.Style>           
        </ListBox>
        <ContentPresenter Grid.Row="7" Grid.Column ="2" Content="{Binding ElementName=SelectedWindowsOsCustomizationOption, Path=(Validation.Errors).CurrentItem}" />

        <!-- WorkgroupName -->
        <Label Grid.Row="8" Grid.Column ="0" >WorkgroupName</Label>
        <ContentControl Grid.Row="8" Grid.Column="2" 
                        Content="{Binding Path=WorkgroupName}" 
                        IsEnabled="{Binding Path=IsWorkGroup}">
            <ContentControl.Style>
                <Style TargetType="ContentControl">
                    <Style.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ContentControl.Style>
        </ContentControl>

        <!-- DomainToJoin -->
        <Label Grid.Row="9" Grid.Column ="0" >DomainToJoin</Label>
        <ContentControl Grid.Row="9" Grid.Column="2" 
                        Content="{Binding Path=DomainToJoin}" 
                        IsEnabled="{Binding Path=IsDomain}">
            <ContentControl.Style>
                <Style TargetType="ContentControl">
                    <Style.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ContentControl.Style>
        </ContentControl>

        <!-- DomainJoinCredentials -->
        <Label Grid.Row="10" Grid.Column ="0" >DomainJoinCredentials</Label>
        <ContentControl Grid.Row="10" Grid.Column="2" 
                        Content="{Binding Path=DomainJoinCredentials}" 
                        IsEnabled="{Binding Path=IsDomain}">
            <ContentControl.Style>
                <Style TargetType="ContentControl">
                    <Style.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ContentControl.Style>
        </ContentControl>      

        <!-- DNSDomainName -->
        <Label Grid.Row="11" Grid.Column ="0" >DNSDomainName</Label>
        <ContentControl Grid.Row="11" Grid.Column="2" 
                        Content="{Binding Path=DNSDomainName}" 
                        IsEnabled="{Binding Path=IsLinux}">
            <ContentControl.Style>
                <Style TargetType="ContentControl">
                    <Style.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ContentControl.Style>
        </ContentControl>

        <!-- SSHPublicKey -->
        <Label Grid.Row="12" Grid.Column ="0" >SSHPublicKey</Label>
        <ContentControl Grid.Row="12" Grid.Column="2" 
                        Content="{Binding Path=SSHPublicKey}" 
                        IsEnabled="{Binding Path=IsLinux}">
            <ContentControl.Style>
                <Style TargetType="ContentControl">
                    <Style.Triggers>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Opacity" Value="0.4" />
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ContentControl.Style>
        </ContentControl>
        
        
       


    </Grid>    
</UserControl>
